#!/usr/bin/python
# -*- coding: utf-8 -*-
"""docstrings
"""

from django.http import HttpResponse

from contact.common import json

def json_response(o):
    return HttpResponse(json.dumps(o))

def success_response():
    return HttpResponse('1')

def fail_response(fail_code):
    """失败响应"""
    assert fail_code < 0
    return HttpResponse(str(fail_code))